#!/sbin/openrc-run

name="alps webmail server"

command="/usr/bin/alps"
command_args="${listen_address:+-addr $listen_address} ${theme:+-theme $theme} $servers"
: ${command_user:="alps:alps"}
command_background=yes
directory="/var/lib/alps"
pidfile="/run/alps.pid"

output_log="/var/log/alps.log"
error_log="/var/log/alps.log"

depend() {
	need net
	after firewall
}

start_pre() {
	checkpath -d -m 755 -o "$command_user" /var/lib/alps
	checkpath -f -m 644 -o "$command_user" /var/log/alps.log
}
